To show a linear or a 2D barcode in your application you should simply create a barcode control, set its properties and place it somewhere in you application. The following code demonstrates how to create and initialize an EAN13 linear barcode and place it in a form:
Linear Barcode Widget |
Copy Code
|
---|---|
NLinearBarcode barcode = new NLinearBarcode(); barcode.Symbology = ENLinearBarcodeSymbology.EAN13; barcode.Text = "0123456789012"; barcode.AutoSize = true; barcode.Location = new Point(10, 10); this.Controls.Add(barcode); |
This code results in the following barcode: